package com.ruoyi.project.ins.utils;

import com.ruoyi.common.utils.StringUtils;

public class SmsUtils {
    private static final String NETEASE_URL = "http://00mail.cn/prod-api/email/api/stand/getNewEmail?email=";

    public static String generateSmsUrl(String email) {
        if (StringUtils.isBlank(email)) {
            throw new RuntimeException("邮箱不能为空");
        }
        if (email.endsWith("@163.com") || email.endsWith("@126.com")) {
            return NETEASE_URL + email;
        }
        throw new RuntimeException("暂不支持该邮箱");
    }
}
